package cn.xnatural.demo.entity;

import cn.xnatural.jpa.LongIdEntity;

import javax.persistence.*;

import org.hibernate.annotations.DynamicUpdate;


/**
 * 文件上传基本信息实体
 * @author xiangxb, 2018-10-07
 */
@Inheritance(strategy = InheritanceType.JOINED)
@Entity
@MappedSuperclass
@DynamicUpdate
public class UploadFile extends LongIdEntity {
    /**
     * 系统生产的唯一文件名(可用作第3方文件服务器的文件id)
     */
    private String finalName;
    /**
     * 原始文件名
     */
    private String originName;
    /**
     * 文件大小
     */
    private Long size;
    /**
     * 备注
     */
    private String comment;

    public String getFinalName() {
        return finalName;
    }

    public UploadFile setFinalName(String finalName) {
        this.finalName = finalName;
        return this;
    }

    public String getOriginName() {
        return originName;
    }

    public UploadFile setOriginName(String originName) {
        this.originName = originName;
        return this;
    }

    public Long getSize() {
        return size;
    }

    public UploadFile setSize(Long size) {
        this.size = size;
        return this;
    }

    public String getComment() {
        return comment;
    }

    public UploadFile setComment(String comment) {
        this.comment = comment;
        return this;
    }
}
